﻿/// <reference path="../jquery/jquery-1.3.2-vsdoc.js" />
/// <reference path="Complaint.Namespaces.js" />
/// <reference path="Complaint.Common.js" />

$(function() {
    $("#categoryTree").tree(
    {
        rules: {
            renameable: "none",
            deletable: "none",
            creatable: "none",
            multiple: "ctrl"
        },
        lang: {
            loading: "Loading ..."
        },
        callback: {
            onselect: function(NODE, TREE_OBJ) {
                var id = $(NODE).attr("id");
                location.href = Complaint.Common.SiteRoot + "/Complaint/SearchByCategory/" + id;
            }
        },
        ui: {
            context: false
        }
    });

    $.tree_reference("categoryTree").open_all();

});